<ion-view view-title="全部订单" class="afall">
	<ion-nav-bar class="customer">
		<ion-nav-back-button></ion-nav-back-button>
	</ion-nav-bar>
	
	<div class="bar bar-subheader line-bottom padding-0">
		<!--描述：顶部模块-->
		<div class="row top">
			<div class="col" on-tap="activeSlide(0)" ng-class="selectTab==0?'top-activated':''">
				全部<!--<span class="spanTap">{{all.page.count}}</span>-->
			</div>
			<div class="col" on-tap="activeSlide(1)" ng-class="selectTab==1?'top-activated':''">
				待付款
			</div>
			<div class="col" on-tap="activeSlide(2)" ng-class="selectTab==2?'top-activated':''">
				待发货
			</div>
			<div class="col" on-tap="activeSlide(3)" ng-class="selectTab==3?'top-activated':''">
				待收货
			</div>
			<div class="col" on-tap="activeSlide(4)" ng-class="selectTab==4?'top-activated':''">
				待评价
			</div>
			<!--<div class="col" on-tap="onshow_refund()">
	 		    售后<span class="spanTap">{{comment.page[0].count}}</span>
	 		</div>-->
		</div>
	</div>
	
    <ion-content overflow-scroll="true" class="has-header has-subheader bg">
    <ion-slide-box delegate-handle="tab-handle" on-touch="onTouch()" on-release="onRelease()" draw-slide="false" on-slide-changed="slideChanged(index)" active-slide="slideIndex" show-pager="false">
		
	<!--全部-->
	<ion-slide>
		<!--搜索框-->	
		<div class="list">
			<li class="item item-input searchInput">
				<img src="./img/guilin/other/searchIcon.png" width="12" class="margin-right-10-my"/>
				<input type="text" placeholder="商品名称" ng-model="input.goods_name"/>
				<div class="searchBtn" on-tap="doSearch()">搜索</div>
			</li>
		</div>
		
		<ion-scroll direction="y" id="all" ng-style="afall_myObjAll" on-scroll="doShowTop('all-handle',999)" delegate-handle="all-handle" lazy-scroll>
			<ion-refresher pulling-text="下拉刷新..." on-refresh="doRefresh()"></ion-refresher>
			
		<div class="noOrder" ng-if="firstHide[0]&&all.data==undifened">
			<img src="./img/guilin/other/icon_nooder@2x.png" />
			<div class="tip">没有相关订单</div>
		</div>
		
		<div class="list" ng-repeat="data in all.data">
    		<li class="item item-borderless item-input titleItem" on-tap="onshow_first(data.store_id,data.order_type_id)">
				<img src="./img/guilin/other/shop_icon.png" />
				<span class="storeTitle">{{data.store_name}} <i class="icon ion-ios-arrow-right margin-left-10-my" ng-if="data.order_type_id!='gift'"></i></span>
				<span class="orderStatus">{{data.status}}</span>
			</li>
			<div ng-repeat="goods in data.order_items" on-tap="onshow_waitPay(0,data)">
				<li class="item item-borderless item-thumbnail-left goodsItem">
					<img src="{{goods.products[0].thumbnail_pic||noImg}}" />
					<div class="row padding-0">
				 		<div class="col-67">
			 				<p class="goodsTitle ellipsis-2">{{goods.products[0].name}}</p>
				 			<p class="goodsGG ellipsis-2">{{goods.products[0].spec_info}}</p>
				 		</div>
				 		<div class="col-33 text-right">
			 				<p class="price" ng-if="data.order_type_id!='gift'">{{goods.products[0].price|currency:'￥'}}</p>
						 	<p class="orgPrice" ng-if="data.order_type_id!='gift'">{{g.product.amount|currency:'￥'}}</p>
						 	<p class="price" ng-show="data.order_type_id=='gift'">{{data.discount_value}}点</p>
						 	<p class="price">×{{goods.products[0].quantity}}</p>
				 		</div>
				 	</div>
				</li>
				<li class="item item-borderless item-thumbnail-left goodsItem secondGoods" ng-repeat="adjunct in goods.products[0].adjunct"><!--配件-->
					<img src="{{adjunct.thumbnail_pic||noImg}}" ng-if="adjunct.thumbnail_pic" />
					<div class="row padding-0">
				 		<div class="col-67">
			 				<p class="goodsTitle ellipsis-2"><span class="pj">[配件]</span>{{adjunct.name}}</p>
				 			<p class="goodsGG">{{adjunct.spec_info}}</p>
				 		</div>
				 		<div class="col-33 text-right">
			 				<p class="price">{{adjunct.price|currency:'￥'}}</p>
						 	<p class="orgPrice">{{g.product.amount|currency:'￥'}}</p>
						 	<p class="price">×{{adjunct.quantity}}</p>
				 		</div>
				 	</div>
				</li> 	
			</div>
			<li class="item item-borderless totalItem">
				<span class="kind" ng-if="data.order_type!='普通'">{{data.order_type}}</span>
				<p ng-show="data.order_type_id!='gift'">共{{data.goods_count}}件商品&nbsp;&nbsp;合计:{{data.total_amount|currency:'￥'}}(含运费:{{data.shipping.cost_shipping|currency:'￥'}})</p>
				<p ng-show="data.order_type_id=='gift'">合计:{{data.discount_value}}点</p>
			</li>
			 <!--按钮-->
			<li class="item buttonItem" ng-if="data.buttons.length>0">
				<div class="btn" style="border-color:{{buttons.color}};color:{{buttons.color}};" on-tap="onshow_waitPay(buttons.id,data,buttons.error,buttons.confirm)" ng-repeat="buttons in data.buttons">{{buttons.name}}</div>
			</li>
		</div>
			<ion-infinite-scroll ng-if="!isLoad&&all.page.count>all.data.length" immediate-check="false" on-infinite="doRefreshMore()" distance="1%"></ion-infinite-scroll>
		</ion-scroll>
		<!--描述：回到顶部-->
		<div class="scroll-to-top" ng-class="showtop999" ng-click="doScrollToTop('all-handle',999)">
			<span class="icon ion-chevron-up"></span>
		</div>
	</ion-slide>
	
	
	<!--待付款-->
	<ion-slide>
		<ion-scroll direction="y" id="nopayed" ng-style="afall_myObj1" on-scroll="doShowTop('nopayed-handle',999)" delegate-handle="nopayed-handle">
			<ion-refresher pulling-text="下拉刷新..." on-refresh="doRefresh()"></ion-refresher>
				<div class="noOrder" ng-if="firstHide[1]&&nopayed.data==undifened">
					<img src="./img/guilin/other/icon_nooder@2x.png" />
					<div class="tip">没有相关订单</div>
				</div>
				
				<div class="list" ng-repeat="data in nopayed.data">
		    		<li class="item item-borderless item-input titleItem">
						<img src="{{data.check?'./img/guilin/other/centerout_gx.png':'./img/guilin/other/centerout_no_gx.png'}}" class="noPayImg" on-tap="is_check($index)"/>
						<img src="./img/guilin/other/shop_icon.png" />
						<span class="storeTitle" on-tap="onshow_first(data.store_id,data.order_type_id)">{{data.store_name}} <i class="icon ion-ios-arrow-right margin-left-10-my" ng-if="data.order_type_id!='gift'"></i></span>
						<span class="orderStatus">{{data.status}}</span>
					</li>
					<div ng-repeat="goods in data.order_items" on-tap="onshow_waitPay(0,data)">
						<li class="item item-borderless item-thumbnail-left goodsItem">
							<img src="{{goods.products[0].thumbnail_pic||noImg}}" />
							<div class="row padding-0">
						 		<div class="col-67">
					 				<p class="goodsTitle ellipsis-2">{{goods.products[0].name}}</p>
						 			<p class="goodsGG ellipsis-2">{{goods.products[0].spec_info}}</p>
						 		</div>
						 		<div class="col-33 text-right">
					 				<p class="price" ng-if="data.order_type_id!='gift'">{{goods.products[0].price|currency:'￥'}}</p>
								 	<p class="orgPrice" ng-if="data.order_type_id!='gift'">{{g.product.amount|currency:'￥'}}</p>
								 	<p class="price" ng-show="data.order_type_id=='gift'">{{data.discount_value}}点</p>
								 	<p class="price">×{{goods.products[0].quantity}}</p>
						 		</div>
						 	</div>
						</li>
						<li class="item item-borderless item-thumbnail-left goodsItem secondGoods" ng-repeat="adjunct in goods.products[0].adjunct"><!--配件-->
							<img src="{{adjunct.thumbnail_pic||noImg}}" ng-if="adjunct.thumbnail_pic" />
							<div class="row padding-0">
						 		<div class="col-67">
					 				<p class="goodsTitle ellipsis-2"><span class="pj">[配件]</span>{{adjunct.name}}</p>
						 			<p class="goodsGG">{{adjunct.spec_info}}</p>
						 		</div>
						 		<div class="col-33 text-right">
					 				<p class="price">{{adjunct.price|currency:'￥'}}</p>
								 	<p class="orgPrice">{{g.product.amount|currency:'￥'}}</p>
								 	<p class="price">×{{adjunct.quantity}}</p>
						 		</div>
						 	</div>
						</li> 	
					</div>
					<li class="item item-borderless totalItem">
						<span class="kind" ng-if="data.order_type!='普通'">{{data.order_type}}</span>
						<p ng-show="data.order_type_id!='gift'">共{{data.goods_count}}件商品&nbsp;&nbsp;合计:{{data.total_amount|currency:'￥'}}(含运费:{{data.shipping.cost_shipping|currency:'￥'}})</p>
						<p ng-show="data.order_type_id=='gift'">合计:{{data.discount_value}}点</p>
					</li>
					 
					<li class="item buttonItem" ng-if="data.buttons.length>0">
						<div class="btn" style="border-color:{{buttons.color}};color:{{buttons.color}};" on-tap="onshow_waitPay(buttons.id,data,buttons.error,buttons.confirm)" ng-repeat="buttons in data.buttons">{{buttons.name}}</div>
					</li>
				</div>
				<div style="height: 45px;"></div>
			<ion-infinite-scroll ng-if="!isLoad&&nopayed.page.count>nopayed.data.length" immediate-check="false" on-infinite="doRefreshMore()" distance="1%"></ion-infinite-scroll>
		</ion-scroll>
		<!--描述：回到顶部-->
		<div class="scroll-to-top" ng-class="showtop999" ng-click="doScrollToTop('nopayed-handle',999)">
			<span class="icon ion-chevron-up"></span>
		</div>
		<!--底部导航-->
		<div class="bar bar-footer padding-0">
			<img src="{{input.checked?'./img/guilin/other/centerout_gx.png':'./img/guilin/other/centerout_no_gx.png'}}" on-tap="check_all()"/><span class="allCheck">全选</span>
			<div class="btn ora" on-tap="more_pay()">合并付款</div>
		</div>
	</ion-slide>
	
	
	<!--待发货-->
	<ion-slide>
		<ion-scroll direction="y" id="ship" ng-style="afall_myObj1" on-scroll="doShowTop('ship-handle',999)" delegate-handle="ship-handle">
			<ion-refresher pulling-text="下拉刷新..." on-refresh="doRefresh()"></ion-refresher>
				<div class="noOrder" ng-if="firstHide[2]&&ship.data==undifened">
					<img src="./img/guilin/other/icon_nooder@2x.png" />
					<div class="tip">没有相关订单</div>
				</div>
		
				<div class="list" ng-repeat="data in ship.data">
		    		<li class="item item-borderless item-input titleItem" on-tap="onshow_first(data.store_id,data.order_type_id)">
						<img src="./img/guilin/other/shop_icon.png" />
						<span class="storeTitle">{{data.store_name}} <i class="icon ion-ios-arrow-right margin-left-10-my" ng-if="data.order_type_id!='gift'"></i></span>
						<span class="orderStatus">{{data.status}}</span>
					</li>
					<div ng-repeat="goods in data.order_items" on-tap="onshow_waitPay(0,data)">
						<li class="item item-borderless item-thumbnail-left goodsItem">
							<img src="{{goods.products[0].thumbnail_pic||noImg}}" />
							<div class="row padding-0">
						 		<div class="col-67">
					 				<p class="goodsTitle ellipsis-2">{{goods.products[0].name}}</p>
						 			<p class="goodsGG ellipsis-2">{{goods.products[0].spec_info}}</p>
						 		</div>
						 		<div class="col-33 text-right">
					 				<p class="price" ng-if="data.order_type_id!='gift'">{{goods.products[0].price|currency:'￥'}}</p>
								 	<p class="orgPrice" ng-if="data.order_type_id!='gift'">{{g.product.amount|currency:'￥'}}</p>
								 	<p class="price" ng-show="data.order_type_id=='gift'">{{data.discount_value}}点</p>
								 	<p class="price">×{{goods.products[0].quantity}}</p>
						 		</div>
						 	</div>
						</li>
						<li class="item item-borderless item-thumbnail-left goodsItem secondGoods" ng-repeat="adjunct in goods.products[0].adjunct"><!--配件-->
							<img src="{{adjunct.thumbnail_pic||noImg}}" ng-if="adjunct.thumbnail_pic" />
							<div class="row padding-0">
						 		<div class="col-67">
					 				<p class="goodsTitle ellipsis-2"><span class="pj">[配件]</span>{{adjunct.name}}</p>
						 			<p class="goodsGG">{{adjunct.spec_info}}</p>
						 		</div>
						 		<div class="col-33 text-right">
					 				<p class="price">{{adjunct.price|currency:'￥'}}</p>
								 	<p class="orgPrice">{{g.product.amount|currency:'￥'}}</p>
								 	<p class="price">×{{adjunct.quantity}}</p>
						 		</div>
						 	</div>
						</li> 	
					</div>
					<li class="item item-borderless totalItem">
						<span class="kind" ng-if="data.order_type!='普通'">{{data.order_type}}</span>
						<p ng-show="data.order_type_id!='gift'">共{{data.goods_count}}件商品&nbsp;&nbsp;合计:{{data.total_amount|currency:'￥'}}(含运费:{{data.shipping.cost_shipping|currency:'￥'}})</p>
						<p ng-show="data.order_type_id=='gift'">合计:{{data.discount_value}}点</p>
					</li>
					 
					<li class="item buttonItem" ng-if="data.buttons.length>0">
						<div class="btn" style="border-color:{{buttons.color}};color:{{buttons.color}};" on-tap="onshow_waitPay(buttons.id,data,buttons.error,buttons.confirm)" ng-repeat="buttons in data.buttons">{{buttons.name}}</div>
					</li>
				</div>	  	  
			
			<ion-infinite-scroll ng-if="!isLoad&&ship.page.count>ship.data.length" immediate-check="false" on-infinite="doRefreshMore()" distance="1%"></ion-infinite-scroll>
		</ion-scroll>
		<!--描述：回到顶部-->
		<div class="scroll-to-top" ng-class="showtop999" ng-click="doScrollToTop('ship-handle',999)">
			<span class="icon ion-chevron-up"></span>
		</div>
	</ion-slide>
	
	
	<!--待收货-->
	<ion-slide>
		<ion-scroll direction="y" id="shiped" ng-style="afall_myObj1" on-scroll="doShowTop('shiped-handle',999)" delegate-handle="shiped-handle">
			<ion-refresher pulling-text="下拉刷新..." on-refresh="doRefresh()"></ion-refresher>
				<div class="noOrder" ng-if="firstHide[3]&&shiped.data==undifened">
					<img src="./img/guilin/other/icon_nooder@2x.png" />
					<div class="tip">没有相关订单</div>
				</div>
		
				<div class="list" ng-repeat="data in shiped.data">
		    		<li class="item item-borderless item-input titleItem" on-tap="onshow_first(data.store_id,data.order_type_id)">
						<img src="./img/guilin/other/shop_icon.png" />
						<span class="storeTitle">{{data.store_name}} <i class="icon ion-ios-arrow-right margin-left-10-my" ng-if="data.order_type_id!='gift'"></i></span>
						<span class="orderStatus">{{data.status}}</span>
					</li>
					<div ng-repeat="goods in data.order_items" on-tap="onshow_waitPay(0,data)">
						<li class="item item-borderless item-thumbnail-left goodsItem">
							<img src="{{goods.products[0].thumbnail_pic||noImg}}" />
							<div class="row padding-0">
						 		<div class="col-67">
					 				<p class="goodsTitle ellipsis-2">{{goods.products[0].name}}</p>
						 			<p class="goodsGG ellipsis-2">{{goods.products[0].spec_info}}</p>
						 		</div>
						 		<div class="col-33 text-right">
					 				<p class="price" ng-if="data.order_type_id!='gift'">{{goods.products[0].price|currency:'￥'}}</p>
								 	<p class="orgPrice" ng-if="data.order_type_id!='gift'">{{g.product.amount|currency:'￥'}}</p>
								 	<p class="price" ng-show="data.order_type_id=='gift'">{{data.discount_value}}点</p>
								 	<p class="price">×{{goods.products[0].quantity}}</p>
						 		</div>
						 	</div>
						</li>
						<li class="item item-borderless item-thumbnail-left goodsItem secondGoods" ng-repeat="adjunct in goods.products[0].adjunct"><!--配件-->
							<img src="{{adjunct.thumbnail_pic||noImg}}" ng-if="adjunct.thumbnail_pic" />
							<div class="row padding-0">
						 		<div class="col-67">
					 				<p class="goodsTitle ellipsis-2"><span class="pj">[配件]</span>{{adjunct.name}}</p>
						 			<p class="goodsGG">{{adjunct.spec_info}}</p>
						 		</div>
						 		<div class="col-33 text-right">
					 				<p class="price">{{adjunct.price|currency:'￥'}}</p>
								 	<p class="orgPrice">{{g.product.amount|currency:'￥'}}</p>
								 	<p class="price">×{{adjunct.quantity}}</p>
						 		</div>
						 	</div>
						</li> 	
					</div>
					<li class="item item-borderless totalItem">
						<span class="kind" ng-if="data.order_type!='普通'">{{data.order_type}}</span>
						<p ng-show="data.order_type_id!='gift'">共{{data.goods_count}}件商品&nbsp;&nbsp;合计:{{data.total_amount|currency:'￥'}}(含运费:{{data.shipping.cost_shipping|currency:'￥'}})</p>
						<p ng-show="data.order_type_id=='gift'">合计:{{data.discount_value}}点</p>
					</li>
					 
					<li class="item buttonItem" ng-if="data.buttons.length>0">
						<div class="btn" style="border-color:{{buttons.color}};color:{{buttons.color}};" on-tap="onshow_waitPay(buttons.id,data,buttons.error,buttons.confirm)" ng-repeat="buttons in data.buttons">{{buttons.name}}</div>
					</li>
				</div>	  	  
		
			<ion-infinite-scroll ng-if="!isLoad&&shiped.page.count>shiped.data.length" immediate-check="false" on-infinite="doRefreshMore()" distance="1%"></ion-infinite-scroll>
		</ion-scroll>
		<!--描述：回到顶部-->
		<div class="scroll-to-top" ng-class="showtop999" ng-click="doScrollToTop('shiped-handle',999)">
			<span class="icon ion-chevron-up"></span>
		</div>
	</ion-slide>
	
	
	<!--待评价-->
	<ion-slide>
		<ion-scroll direction="y" id="comment" ng-style="afall_myObj1"  on-scroll="doShowTop('comment-handle',999)" delegate-handle="comment-handle" lazy-scroll>
			<ion-refresher pulling-text="下拉刷新..." on-refresh="doRefresh()"></ion-refresher>
				<div class="noOrder" ng-if="firstHide[4]&&comment.data==undifened">
					<img src="./img/guilin/other/icon_nooder@2x.png" />
					<div class="tip">没有相关订单</div>
				</div>
		
				<div class="list" ng-repeat="data in comment.data">
		    		<li class="item item-borderless item-input titleItem" on-tap="onshow_first(data.store_id,data.order_type_id)">
						<img src="./img/guilin/other/shop_icon.png" />
						<span class="storeTitle">{{data.store_name}} <i class="icon ion-ios-arrow-right margin-left-10-my" ng-if="data.order_type_id!='gift'"></i></span>
						<span class="orderStatus">{{data.status}}</span>
					</li>
					<div ng-repeat="goods in data.order_items" on-tap="onshow_waitPay(0,data)">
						<li class="item item-borderless item-thumbnail-left goodsItem">
							<img src="{{goods.products[0].thumbnail_pic||noImg}}" />
							<div class="row padding-0">
						 		<div class="col-67">
					 				<p class="goodsTitle ellipsis-2">{{goods.products[0].name}}</p>
						 			<p class="goodsGG ellipsis-2">{{goods.products[0].spec_info}}</p>
						 		</div>
						 		<div class="col-33 text-right">
					 				<p class="price" ng-if="data.order_type_id!='gift'">{{goods.products[0].price|currency:'￥'}}</p>
								 	<p class="orgPrice" ng-if="data.order_type_id!='gift'">{{g.product.amount|currency:'￥'}}</p>
								 	<p class="price" ng-show="data.order_type_id=='gift'">{{data.discount_value}}点</p>
								 	<p class="price">×{{goods.products[0].quantity}}</p>
						 		</div>
						 	</div>
						</li>
						<li class="item item-borderless item-thumbnail-left goodsItem secondGoods" ng-repeat="adjunct in goods.products[0].adjunct"><!--配件-->
							<img src="{{adjunct.thumbnail_pic||noImg}}" ng-if="adjunct.thumbnail_pic" />
							<div class="row padding-0">
						 		<div class="col-67">
					 				<p class="goodsTitle ellipsis-2"><span class="pj">[配件]</span>{{adjunct.name}}</p>
						 			<p class="goodsGG">{{adjunct.spec_info}}</p>
						 		</div>
						 		<div class="col-33 text-right">
					 				<p class="price">{{adjunct.price|currency:'￥'}}</p>
								 	<p class="orgPrice">{{g.product.amount|currency:'￥'}}</p>
								 	<p class="price">×{{adjunct.quantity}}</p>
						 		</div>
						 	</div>
						</li> 	
					</div>
					<li class="item item-borderless totalItem">
						<span class="kind" ng-if="data.order_type!='普通'">{{data.order_type}}</span>
						<p ng-show="data.order_type_id!='gift'">共{{data.goods_count}}件商品&nbsp;&nbsp;合计:{{data.total_amount|currency:'￥'}}(含运费:{{data.shipping.cost_shipping|currency:'￥'}})</p>
						<p ng-show="data.order_type_id=='gift'">合计:{{data.discount_value}}点</p>
					</li>
					 
					<li class="item buttonItem" ng-if="data.buttons.length>0">
						<div class="btn" style="border-color:{{buttons.color}};color:{{buttons.color}};" on-tap="onshow_waitPay(buttons.id,data,buttons.error,buttons.confirm)" ng-repeat="buttons in data.buttons">{{buttons.name}}</div>
					</li>
				</div>	  	  
				
			<ion-infinite-scroll ng-if="!isLoad&&comment.page.count>comment.data.length" immediate-check="false" on-infinite="doRefreshMore()" distance="1%"></ion-infinite-scroll>
		</ion-scroll>
		<!--描述：回到顶部-->
		<div class="scroll-to-top" ng-class="showtop999" ng-click="doScrollToTop('comment-handle',999)">
			<span class="icon ion-chevron-up"></span>
		</div>
	</ion-slide>
		
    </ion-slide-box>
    </ion-content>
</ion-view>